Hint #1
Locks will be in a multiple of 4.
Answer
32

There are 8 sacks filled with 32 locks and 3 sacks filled with 27 keys.