@Override
    public int getCount() {
        if (mCounted) {
            return mCount;
        }
        mCount = 0;
        int numHeaders = mDelegate.getNumHeaders();
        if (numHeaders == 0) {
            mCount = mDelegate.getCount();
            mCounted = true;
            return mCount;
        }

        for (int i = 0; i < numHeaders; i++) {
            // Pad count with space for header and trailing filler in header
            // group.
            mCount += mDelegate.getCountForHeader(i) + unFilledSpacesInHeaderGroup(i) + mNumColumns;
        }
        mCounted = true;
        return mCount;
    }
Adapter wrapper to insert extra views and otherwise hack around GridView to
add sections and headers.

@author Tonic Artos
Library/src/com/tonicartos/widget/stickygridheaders/StickyGridHeadersBaseAdapterWrapper.java