> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/module-documentation/game-module-lists/count-methods/gamequestlist-count-methods.md).

# GameQuestList Count() Methods

#### Count by status of the quest

```csharp
// Get the number of quests, pass in an optional uid
public int CountQuestsInProgress(string uid = null)
public int CountQuestsSucceeded(string uid = null)
public int CountQuestsFailed(string uid = null)
public int CountQuestsCompleted(string uid = null)

// Optionally pass in a Quest or GameQuest instead of uid
public int CountQuestsSucceeded(Quest quest)
public int CountQuestsSucceeded(GameQuest gameQuest)
```

#### Count the `GameQuests` which may have an impact on `stats`

```csharp
// Get the number of quests that affect stats
public int CountModifyingStats(string uid = null)
```

#### **Examples**

Each can optionally include a `Uid()` to specify the quest to search for, or they will count all quests.

```csharp
Debug.Log($"There are {gameQuestList.CountInProgress()} quests in progress");
Debug.Log($"Successfully completed {gameQuestList.CountSucceeded()} total quests");
Debug.Log($"There are {gameQuestList.CountFailed()} failed quests");
Debug.Log($"Completed quest {uid} {gameQuestList.CountComplete(uid)} times");
Debug.Log($"There are {gameQuestList.CountModifyingStats()} quests modifying stats.");
```
