counting 7 segment display

Why so complicated? Just drive it from Arduino directly.