There's got to be a better way to do this, but here's something that works, if I understand what you want to do.
Create a notebook to play with:
nb = CreateDocument[{
Cell["My Title", "Title"],
Cell["My first section", "Section"],
Cell["My second section", "Section"],
Cell[TextData[{"Section ",
CounterBox["Section"]}], "Section"]}];
Select the last cell, which happens to be a Section cell.
SelectionMove[nb, After, Notebook];
SelectionMove[nb, Previous, Cell];
Count backwards.
cnt = sectionCnt = c = 0;
While[True, Print[c];
c = NotebookRead[nb];
If[c === {}, Break[]];
If[c[[2]] == "Section", sectionCnt++];
cnt++;
SelectionMove[nb, Previous, Cell]];
Now sectionCnt
should hold the value that you want. You can move back to where you were easily enough:
Do[SelectionMove[nb, Next, Cell], {cnt}]