I am a fan of using the hardware timers for the sort of counting you are doing. E.g. you could set up timer 0 with a prescale of 8 and count to 124 (or is it 125, I would need to read the specs again), then auto reset and interrupt. You would get an interrupt every 100us, then in the interrupt routine (ISR) use SBIW to subtract 1 from a register pair (effectively a 16 bit counter) preloaded with what ever count you want - e.g. for 10Hz out you would start with 500. On software count = 0 invert output and reload software count. It requires a bit of setting up, but the logic is much clearer than nested loops with delays. And much easier to modify - you could add a second output in the ISR just by adding another load/test/invert bit of code, no change to the 100us loop, no working out nop delays. After setting up the counter and enabling interrupts the mainline just spins on a RJMP *-1 (jump to itself). I didn't set up a program to test this, but I'd take a bet there's less instructions needed.
Just putting this as an alternate. Does require more knowledge of the processor. If you master the ATMEL timers, PIC timers are easy.
It's a while since I did any ATMEL programs, so this is rough and may be wrong
SETUP
set Waveform Generation Mode = CTC
set OCRA = 124
set Clock Select = prescale 8
set Timer/Counter0 Output Compare Match A Interrupt Enable
LDI R16,low(500)
LDI R17,high(500)
enable interrupts
spin
ISR - since there is only one enabled interrupt, could code this at address 0x0003
SBIW R16,1
BRNE gobak
LDI R16,low(500)
LDI R17,high(500)
SBI pin
gobak: RETI