admobadapter/src/main/java/com/clockbyte/admobadapter/AdmobRecyclerAdapterWrapper.java
@Override
    public int getItemCount() {

        if (mAdapter != null) {
            /*
            No of currently fetched ads, as long as it isn't more than no of max ads that can
            fit dataset.
             */
            int noOfAds = AdapterCalculator.getAdsCountToPublish(adFetcher.getFetchedAdsCount(), mAdapter.getItemCount());
            return mAdapter.getItemCount() > 0 ? mAdapter.getItemCount() + noOfAds : 0;
        } else {
            return 0;
        }
    }
@Override
    public int getItemCount() {

        if (mAdapter != null) {
            /*
            No of currently fetched ads, as long as it isn't more than no of max ads that can
            fit dataset.
             */
            int noOfAds = AdapterCalculator.getAdsCountToPublish(adFetcher.getFetchedAdsCount(), mAdapter.getItemCount());
            return mAdapter.getItemCount() > 0 ? mAdapter.getItemCount() + noOfAds : 0;
        } else {
            return 0;
        }
    }
<p>Gets the count of all data, including interspersed ads.</p>
<p/>
<p>If data size is 10 and an ad is to be showed after every 5 items starting at the index 0, this method
will return 12.</p>

@return the total number of items this adapter can show, including ads.
@see AdmobRecyclerAdapterWrapper#setNoOfDataBetweenAds(int)
@see AdmobRecyclerAdapterWrapper#getNoOfDataBetweenAds()