go/doc/headscan: update script to count headings with an ID attribute
go/doc/headscan: update script to count headings with an ID attribute

Fixes script used to sanity-check the heading-detection heuristic of go/doc.
Fixes issue 8467.

LGTM=gri
R=golang-codereviews, gobot, gri
CC=golang-codereviews
https://codereview.appspot.com/128720043

Committer: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>

webfd/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,webfd/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh,sanjosh/sanjos100-tipc,bryanxu/go-zh,webfd/go-zh,bryanxu/go-zh,d0f/go-zh,webfd/go-zh,bryanxu/go-zh,bryanxu/go-zh,bryanxu/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,d0f/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,webfd/go-zh,webfd/go-zh,webfd/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,bryanxu/go-zh,d0f/go-zh,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh