Swimming lap counter by proximity

Hi, I want to start a project to make a Swimming lap counter by proximity.

First, I have been searching for something like that, but I only have found some projects that count by touch to device. I want to make it by mange proximity between sides.

I have been looking for a device to control proximity, to take it into the swimsuit, swimming goggles o under swim cap. Then with this device it would be easy to manage how many times you go and back to save a counter.

I have been thinking to use some of these device with a arduino or raspberry pi, all of them are small and have BT connectivity:

http://redbearlab.com/blemini/

http://bleduino.cc/
http://www.rfduino.com/

Any idea of how could I make it?

Thanks