Hi Amardeep
take a look at the following method which i believe does the count.
sap.ui.model.odata.ODataListBinding.prototype._getLength
https://sapui5.hana.ondemand.com/sdk/resources/sap/ui/model/odata/ODataListBinding-dbg.js
the headers aren't included.
you could set oModel( ).setCountSupported( false )
or extend the method (locally) in the list binding to get the custom model headers
Cheers
John P