---
id: 6a2037a68a0bc2aef0005fff
title: "Challenge 337: Tally Counter"
challengeType: 29
dashedName: challenge-337
---

# --description--

Given a string of tally marks, return the total count represented.

- Each pipe `"|"` represents one count.
- Every fifth mark is represented as a forward slash `"/"`, completing a group of five (`"||||/"`).
- Groups are separated by a space.

# --hints--

`get_tally_count("||||")` should return `4`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_tally_count("||||"), 4)`)
}})
```

`get_tally_count("||||/")` should return `5`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_tally_count("||||/"), 5)`)
}})
```

`get_tally_count("||||/ |||")` should return `8`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_tally_count("||||/ |||"), 8)`)
}})
```

`get_tally_count("||||/ ||||/ ||||/ ||")` should return `17`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_tally_count("||||/ ||||/ ||||/ ||"), 17)`)
}})
```

`get_tally_count("||||/ ||||/ ||||/ ||||/ ||||/ ||||/ ||||/ ||||/ |")` should return `41`.

```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_tally_count("||||/ ||||/ ||||/ ||||/ ||||/ ||||/ ||||/ ||||/ |"), 41)`)
}})
```

# --seed--

## --seed-contents--

```py
def get_tally_count(s):

    return s
```

# --solutions--

```py
def get_tally_count(s):
    return len(s.replace(" ", ""))
```
