Add option to return number of labels
Add test case for number of labels