Removing Empty Measures

Does anyone know the magic trick to removing the empty measures from a score? I can't seem to determine how this is done. I've tried selecting them but nothing works. Also is there a way to limit or set the number of measures for a new score? Thanks in advance