Count Number of Distinct Integers After Reverse Operations