What you want, from the sound of it, is to be able to retrieve the total number of rows in the (sub)Model object that backs the dataTable. This problem has the same solution whether you are using rich:dataTable or the core h:dataTable.
Try something like this:
The rowCount attribute of tableModel may not be available if you used a raw collection such as a list or array for the dataTable value. If so, you'll need to explicitly construct a ListDataModel (or ArrayDataModel) to wrap the collection and present it as a backing bean property.
I use a variation of this when I have total rows in a table. I subclass the DataModel class of my choice to add totals as subclass properties.
Sometimes the only way things ever got fixed is because people became uncomfortable.
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad: