<p>How can I count the number of elements in an array, because contrary to logic array.count(string) does not count all the elements in the array, it just searches for the number of occurrences of string.</p>

The method len() returns the number of elements in the list.
Syntax:
```
```
len(myArray)
```
```
Eg:
```
```
myArray = [1, 2, 3]
len(myArray)
```
```
Output:
```
```
3
```
```