Use int64 for count too

While at it rename "num" into "count" to be
more consistent.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>