TeamCity to read and update version number from version file

For your first question: yes, it's possible:

  1. Add .git(.svn, .hg etc) directory to VCS rules
  2. Read version number in your build script in teamcity(command line runner) in your favorite scripting language and incerement it.
  3. Set build number via interaction protocol
  4. Update build number in version file in your favorite scripting language
  5. Perform your build steps
  6. Perform commit and push, you can because you already have .git(.svn, .hg etc) directory in build dir in last step

Sorry but i can't answer for your second question because i don't know any appropriate tools for windows. On linux i would use bash.