$this->countModules( 'user1 + user2' );
Although the usual arithmetic operators, +. -. *, / will work as expected, these are not as useful as the logical operators 'and' and 'or'.
For example, to determine if the 'user1' position and the 'user2' position both have at least one Module enabled, you can use the function call
$this->countModules( 'user1 and user2' );
Careful: A common mistake is to try something like this
$this->countModules( 'user1' and 'user2' );
This is pretty much guaranteed to always return false regardless of the number of Modules enabled in either position, so check what you are passing to countModules carefully.
You must have exactly one space character separating each item in the string. For example, 'user1+user2' will not produce the desired result as there must be a space character either side of the '+' sign. Also, 'user1 + user2' will produce a PHP error message as there is more than one space separating each element.
Example: The user1 and user2 Module positions are to be displayed in the region, but you want the region to not appear at all if no Modules are enabled in either position.
countModules( 'user1 or user2' )) : ?>
Example: The user1 and user2 Module positions are to be displayed side-by-side with a separator between them. However, if only one of the Module positions has any Modules enabled then the separator is not needed. Furthermore, if neither user1 or user2 has any Modules enabled then nothing is output.
countModules( 'user1 or user2' )) : ?>
countModules( 'user1' )) : ?>
countModules( 'user1 and user2' )) : ?>
countModules( 'user2' )) : ?>
Notice how the first countModules call determines if there any Modules to display at all. The second determines if there are any in the 'user1' position and if there are it displays them. The third call determines if both user1 and user2 positions have any Modules enabled and if they do then if provides a separator between them. Finally, the fourth call determines if there are any enabled Modules in the 'user2' position and displays them if there are any.