Sliding window for sequencing data

Hi!

I have some sequencing data that I have aligned using maq software

Now, I have data that looks like this each line is a 'tag'

chr1 10001
chr1 10002
chr1 10005
chr1 10007
chr1 10008
chr1 10008
chr1 10008
chr1 10019
chr1 10019
chr1 10020

What I really want to find out is how many of these 'tags' i've got in a space of 150 units (column 2 contains coordinates in units where the tag is). So ideally some way of looking at each line, looking at the coordinate on each line then seeing how many other tags there are 75 units either side of this coordinate. Then maybe print this value in a third column?

Does that make sense? I am a relative unix newbie and have no idea where to start. I've been messing around with awk for a while trying to think of something but I'm clueless. Any help much appreciated

awk -v x=$2 '$2 == $x+150' |<- my pitiful attempt to get started

Could you give an example of the desired output?