Fixed the compatibility issue with RStudio

RStudio runs some post process after each function, which uses length.

Have to replace our length with count