Working with current Domino 8.5.2 and today it took me a long time to figure out the problem with multiple categorized columns.
I had a view with 3 categorized columns, and used getAllEntriesByKey to retrieve all entries with first categorized key. But the function returns incorrect number of entries. So does the getAllDocumentsByKey and getCount functions. I was really frustrated until finding out the problem is a known issue. Unfortunately, the problem has not yet been fixed, so we have to wait for future release (as noted here).
So the best solution now is using FTSearch, or don’t make use of categorized columns!