I have kept four different species of shrimp with two different species of crayfish, so yes you can keep crayfish and shrimp in the same tank. Most dwarf shrimp will not be aggresive at all. However, macrobrachium shrimp do tend to be very aggresive.
As to the number of crayfish you can keep in a 20g tank, it depends on the type. You could keep more than 2 crayfish, if they are a dwarf species that is peaceful with their own kind. However, some species are aggresive towards any 'invading' crayfish.
What you should do is, find a species of crayfish that is available in your area and find out what their environmental and population requirements are (water conditions & number in a 20g tank). Then see what kind of shrimp have the same water requirements.