Added getCount() function to all list-like classes.
Added tests for the above.