How often is this pattern repeating? Constantly?
Count will start counting immediately and then continue to count for 15ms. It won't sit there waiting for the first pulse and THEN count for 15ms.
What if the start of the command occurs in the middle of your 3 pulse sequence? Or in between two of those 3 pulse patterns?

The fact that always seem to get MORE than 3 counts indicates that your pin isn't driven to both states. Verify that you have well defined logic states for both '1' and '0' on the input.

/Henrik.