<｜begin▁of▁sentence｜>### Instruction:
As a wildlife rehabilitator, I often encounter situations where I need to keep track of the frequency of specific types of injuries in the animals I am caring for. Just like keeping track of the health status of the animals, network analysis also involves identifying the frequency and existence of connections within a graph. In a recent case, I had to count the number of times certain bird species nested in the same area, similar to counting the multiplicities of edges in a network graph using the count_multiple function in igraph. This information is crucial for understanding the relationships within the bird populations and can help in making informed decisions for the rehabilitation process.
### Response:
from igraph import Graph

# Define your graph
edges = [(1, 2), (1, 2), (2, 3), (3, 4), (4, 2)]
g = Graph(edges=edges)

# Count the multiplicities of all edges
multiplicities = g.count_multiple()

# Print multiplicities for each edge
for edge, multiplicity in zip(g.es, multiplicities):
    print(f'Edge {edge.tuple} has multiplicity: {multiplicity}')
<|EOT|>
