Add script function for counting list values.

Signed-off-by: Toha <tohenk@yahoo.com>