Years

List the years where there were commits.

$ git log --date=format:'%Y' --pretty=format:'%ad' | uniq

See this Data manipulation page for how to apply grouping and counting to this.