To check the unlock counter on your Sony phone follow this:
1. Turn on your phone without a sim card.
2. Type *#*#7378423#*#*
3. Select Service Info
4. Select Simlock
5. Check what lock is closed and what the counter attempt number is.
6. If the counter is 0 then you can not unlock this phone by codes.