in reply to having trouble with count

Some pointers.

Your problem lies with those last two points. Have a think about the logic required to accumulate a series of values.

Cheers,

JohnGG