fix type of task count and use sizeof() to get hint length