Testing concurrent access in GAE
Please vote if it solve your problem :)
GAE works like that:

You can have multiple instances of program with separated code space - mean instance has not access to other instance.
You can have multiple threads in program instance if you mark code as thread safe - mean each instance has access to same code/memory (counter in you case) - you need locking to avoid conflicts.
Memcache is synchronized - updated of value is available to all programs and their threads - there is no concurrent races - mean you can read recent cache value and track if it not change during your changes.

How to simulate concurrent access to piece of code? - You should not simulate you should use clear locking at level of thread or program - since it very hard to simulate concurrent races - it is not know who will win program or thread race since in each environment result is undefined - mean Linux, Windows, Python.
Is it possible to simulate concurrent access to a piece of code in Google App Engine? I am trying to unit test a piece of code that increments a counter. It is possible that the code will be used by different instances of the app concurrently and although I have made the datastore access sections transactional and also used memcache cas I would feel better if there was some way to test it.
I have tried setting up background threads but Testbed seems to be creating a new environment for each thread.