Unexpected behavior of ++myCount
Jaromanda X is indeed correct - min() is defined on line 92 of Arduino.h, thusly:

#define min(a,b) ((a)&lt;(b)?(a):(b))


Therefore when the ++mycount is substituted for the a, it is in fact substituted twice, in both the (a)&lt;(b) and the (a):(b), leading to the increment by 2, each time min(++mycount,8) is executed.

As VE7JRO mentions, as it is defined in this way, the reference for min(x,y) states:


  Warning
  
  Because of the way the min() function is implemented, avoid using
  other functions inside the brackets, it may lead to incorrect results

min(a++, 100);   // avoid this - yields incorrect results

min(a, 100);
a++;            // use this instead - keep other math outside the function



As the second example states, keep any incrementing outside of the min() macro.

Alternatively, I think that you could use the inline function to workaround this issue:

#undef min
inline int min(int a,int b) {return ((a)&lt;(b)?(a):(b)); }


Because inline provides a real function call (with parameters) it avoids the use of macros and substitution, which gives rise to the issue that you encountered.

inline is a much better (safer) way to implement the functionality provided by macros, in many cases. For more information, see Inline functions in C++ or read a C++ reference.